import requests
url = 'https://www.163.com/'
# 设置请求头
headers = {
    # 伪造浏览器
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36',
    'hello': 'cl123',
    'Authrorization': 'token123456'
}
resp = requests.get(url, headers=headers)
# 获取请求头
print(resp.request.headers)
print('---------------------------------------')
print(resp.text)
